--- src/getself.c.orig	Wed Mar  8 18:20:39 2017
+++ src/getself.c	Mon Mar 20 18:46:27 2017
@@ -47,13 +47,7 @@ int get_number_cpus()
 const char *get_self_executable(int argc, char **argv)
 {
 	static char res[PATH_MAX];
-	int mib[4];
-	mib[0] = CTL_KERN;
-	mib[1] = KERN_PROC;
-	mib[2] = KERN_PROC_PATHNAME;
-	mib[3] = -1;
-	size_t cb = sizeof(res);
-	sysctl(mib,4,res,&cb,NULL,0);
+	realpath("${GAMEDIR}/", res);
 	return res;
 }
 
